Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
No se puede OBTENER /[objeto% 20HTMLDivElement]

Tengo el siguiente código, pero cuando abro el archivo a través de localhost, aparece este mensaje: Cannot GET /[object%20HTMLDivElement]. Esta es una aplicación para obtener la ubicación. Aquí está mi código HTML:

 <!DOCTYPE html> <html lang="en"> <head > <style> h1{ font-family:cursive; font-size:32pt; } body{ display:flex; flex-direction:column; align-items:center; } </style> </head> <body> <h1> GeoLocation Based on Speedometer and Compass </h1> <img src="compass.jpg"> <input type="button" id="locationBtn" value="Get My Location" "> <div id="location"> You will get Location here!! </div> <script src="geoLocation.js"> </script> </body> </html>

aquí está mi código JS (lo he usado en un archivo js separado):

 var location=document.getElementById('location'); var button=document.getElementById('locationBtn'); button.addEventListener('click', function showLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); }else{ alert('this browser does not support geolocation'); } }); function showPosition(position){ location.innerHTML="Latitude: " + position.coords.latitude.toString() + "<br>Longitude: " + position.coords.longitude.toString(); }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!